/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.mechanism;

import edu.wpi.first.wpilibj.Victor;

/**
 *
 * @author 8349
 */
public class PitchingMechanism extends Victor{
    
    private boolean running;
    private double storedvalue;

    public PitchingMechanism(int slot, int channel) {
        super(slot, channel);
    }

    public PitchingMechanism(int channel) {
        super(channel);
    }
    
    public void start(){
        running = true;
        set(storedvalue);
    }
    
    public void stop(){
        storedvalue = get();
        set(0);
        running = false;
    }

    @Override
    public void set(double speed) {
        if (running){
            super.set(speed);
        }
    }
    
    public boolean isRunning(){
        return running;
    }
    
}
